Optimal. Leaf size=52 \[ \frac{a^2 (c x)^{m+1}}{c (m+1)}+\frac{2 a b (c x)^m}{m}-\frac{b^2 c (c x)^{m-1}}{1-m} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0220231, antiderivative size = 52, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 1, integrand size = 15, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.067, Rules used = {270} \[ \frac{a^2 (c x)^{m+1}}{c (m+1)}+\frac{2 a b (c x)^m}{m}-\frac{b^2 c (c x)^{m-1}}{1-m} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 270
Rubi steps
\begin{align*} \int \left (a+\frac{b}{x}\right )^2 (c x)^m \, dx &=\int \left (b^2 c^2 (c x)^{-2+m}+2 a b c (c x)^{-1+m}+a^2 (c x)^m\right ) \, dx\\ &=-\frac{b^2 c (c x)^{-1+m}}{1-m}+\frac{2 a b (c x)^m}{m}+\frac{a^2 (c x)^{1+m}}{c (1+m)}\\ \end{align*}
Mathematica [A] time = 0.036158, size = 36, normalized size = 0.69 \[ (c x)^m \left (\frac{a^2 x}{m+1}+\frac{2 a b}{m}+\frac{b^2}{(m-1) x}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.003, size = 68, normalized size = 1.3 \begin{align*}{\frac{ \left ( cx \right ) ^{m} \left ({a}^{2}{x}^{2}{m}^{2}-{a}^{2}{x}^{2}m+2\,ab{m}^{2}x+{b}^{2}{m}^{2}-2\,xab+{b}^{2}m \right ) }{x \left ( 1+m \right ) m \left ( -1+m \right ) }} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.27348, size = 117, normalized size = 2.25 \begin{align*} \frac{{\left (b^{2} m^{2} + b^{2} m +{\left (a^{2} m^{2} - a^{2} m\right )} x^{2} + 2 \,{\left (a b m^{2} - a b\right )} x\right )} \left (c x\right )^{m}}{{\left (m^{3} - m\right )} x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.470999, size = 202, normalized size = 3.88 \begin{align*} \begin{cases} \frac{a^{2} \log{\left (x \right )} - \frac{2 a b}{x} - \frac{b^{2}}{2 x^{2}}}{c} & \text{for}\: m = -1 \\a^{2} x + 2 a b \log{\left (x \right )} - \frac{b^{2}}{x} & \text{for}\: m = 0 \\c \left (\frac{a^{2} x^{2}}{2} + 2 a b x + b^{2} \log{\left (x \right )}\right ) & \text{for}\: m = 1 \\\frac{a^{2} c^{m} m^{2} x^{2} x^{m}}{m^{3} x - m x} - \frac{a^{2} c^{m} m x^{2} x^{m}}{m^{3} x - m x} + \frac{2 a b c^{m} m^{2} x x^{m}}{m^{3} x - m x} - \frac{2 a b c^{m} x x^{m}}{m^{3} x - m x} + \frac{b^{2} c^{m} m^{2} x^{m}}{m^{3} x - m x} + \frac{b^{2} c^{m} m x^{m}}{m^{3} x - m x} & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (c x\right )^{m}{\left (a + \frac{b}{x}\right )}^{2}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]